/*
Author     :Dsi
Date       : 2021/11/24 20:07
Description: 
*/
public class TestDemo {
    private volatile static TestDemo s;

    private TestDemo() {
        if(s!=null){
            throw new RuntimeException("沙雕，休想暴力反射");
        }
    }

    public static TestDemo get(){
        if(s==null){
        synchronized (TestDemo.class){
                if(s==null)
                s=new TestDemo();
            }
        }
        return s;
    }

}
